home *** CD-ROM | disk | FTP | other *** search
/ PC Media 2 / PC MEDIA CD02.iso / share / udos / masdir54 / sdlsetup.bat < prev    next >
Encoding:
DOS Batch File  |  1992-01-25  |  8.2 KB  |  208 lines

  1. ECHO OFF
  2. : SDLSETUP.BAT for PC/MS DOS Version 3.0 or later
  3. IF NOT EXIST sdl_get.EXE GOTO FILES
  4. set GET=
  5. sdl_get E
  6. IF ERRORLEVEL 30 GOTO ENVOK
  7. ECHO * * *
  8. ECHO SDLSETUP has determined that it will be necessary to shell to
  9. ECHO a second copy of the command processor in order to increase
  10. ECHO the amount of DOS Environment space available.  This will be
  11. ECHO completely automatic; however, it would be a good idea to
  12. ECHO later read the information in the documentation about increasing
  13. ECHO your Environment space so that SDL and other programs will have
  14. ECHO sufficient Environment to successfully execute.  If you are 
  15. ECHO running SDLSETUP from a SHELL, please read SHELLS.DOC.
  16. ECHO * * *
  17. ECHO You may see messages about "Out of Environment Space" or 
  18. ECHO duplicate informational messages from SDLSETUP because of the
  19. ECHO secondary command processor.  These will be taken care of 
  20. ECHO automatically and are nothing to be concerned about.
  21. ECHO * * *
  22. PAUSE
  23. %COMSPEC% /E:2048 /C%0 %1 %2 %3 %4
  24. goto EXIT
  25. :ENVOK
  26. sdl_get B
  27. IF EXIST SDLSETUP.TXT ERASE SDLSETUP.TXT
  28. set GET=SDLSETUP
  29. if NOT (%GET%)==(SDLSETUP) goto ENVIRON
  30. if NOT (%1)==() SET GET=SDLCONFG
  31. ECHO %GET%.BAT copyright (c) 1987-1991 Bob Stephan. All rights reserved.
  32. Echo * * *  This version of %GET% is for PC or MS DOS   * * *
  33. Echo * * * If you are using DR DOS, please read DRDOS.DOC  * * *
  34. ECHO * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  35. ECHO This is a BATCH program so it may be a little slow, but
  36. ECHO you don't have to run it very often so please be patient.
  37. ECHO * * *
  38. sdl_get YE
  39. if errorlevel 2 goto drive_ok
  40. Echo It will run faster if you run it from a hard disk or a RAM disk (VDISK).
  41. Echo For best results COPY %GET%:SDL*.* to a RAM drive or to a subdirectory on
  42. Echo your hard disk. You may exit to do this now if you wish.  
  43. Echo If you use the floppy disk, it must NOT be write protected.
  44. ECHO * * *
  45. sdl_get N "Are you ready to continue (Y,n)? "
  46. IF ERRORLEVEL 126 GOTO QUIT
  47. IF NOT ERRORLEVEL 89 GOTO QUIT
  48. :drive_ok
  49. IF NOT EXIST SDL.COM GOTO FILES
  50. SDL /!
  51. SET $=54 55
  52. IF ERRORLEVEL 54 IF NOT ERRORLEVEL 55 GOTO READY
  53. IF ERRORLEVEL 155 GOTO VERSION
  54. IF NOT ERRORLEVEL 154 GOTO VERSION
  55. SET $=154 155
  56. :READY
  57. ECHO This program will modify the file SDL.COM on this disk.
  58. ECHO None of your original files will be modified in any way.
  59. ECHO Your CONFIG.SYS and AUTOEXEC.BAT will NOT be changed.
  60. ECHO * * *
  61. ECHO Checking system resources. Please wait.
  62. SDL_GET LE "MASDIR 5.4"
  63. IF NOT ERRORLEVEL 1 GOTO CKDEBUG
  64. ECHO If this is the original %GET% disk you should establish a working
  65. ECHO disk and/or directory to preserve the original (see SDLSETUP.DOC).
  66. ECHO * * *
  67. sdl_get N "Are you ready to continue (Y,n)? "
  68. IF ERRORLEVEL 126 GOTO QUIT
  69. IF NOT ERRORLEVEL 89 GOTO QUIT
  70. :CKDEBUG Test for running DEBUG
  71. IF EXIST DEBUG.COM GOTO CKFILES
  72. IF EXIST DEBUG.TST ERASE DEBUG.TST
  73. ECHO R >debug.txt
  74. ECHO Q >>debug.txt
  75. DEBUG <debug.txt >debug.tst
  76. IF NOT EXIST DEBUG.TST GOTO NODEBUG
  77. SDL_GET F DEBUG.TST
  78. IF %GET% == 0 GOTO NODEBUG
  79. IF EXIST DEBUG.T?T ERASE DEBUG.T?T >NUL
  80. :CKFILES
  81. FOR %%F IN (SDLPARMS.BAT SDLDEBUG.BAT SDLFINIS.BAT SDLNOTOG.BAT) DO IF NOT EXIST %%F GOTO FILES
  82. sdl_get D
  83. IF ERRORLEVEL 30 GOTO BEGIN
  84. IF NOT ERRORLEVEL 20 GOTO NOT1
  85. ECHO * * *
  86. set GET=SDLSETUP
  87. if NOT (%1)==() SET GET=SDLCONFG
  88. ECHO DOS Versions prior to 3.1 are not specifically supported. If you have
  89. Echo any difficulty running %GET% under DOS 2.x, please see SDLSETUP.DOC.
  90. ECHO R >sdlsetup.txt
  91. ECHO * * *
  92. :BEGIN
  93. ECHO All checks completed, ready to proceed with SETUP.
  94. ECHO * * *
  95. set GET=SDLSETUP
  96. if NOT (%1)==() SET GET=SDLCONFG
  97. ECHO If you do not want to continue with %GET% press Esc to exit...
  98. sdl_get C "Press C to continue, D to read the Documentation first(C,d): " CD}~
  99. IF ERRORLEVEL 126 GOTO QUIT
  100. IF ERRORLEVEL 125 GOTO CONTINUE
  101. IF ERRORLEVEL 67 IF NOT ERRORLEVEL 68 GOTO CONTINUE
  102. IF NOT EXIST SDLSETUP.DOC GOTO MENTION
  103. IF NOT EXIST SDL_SHOW.EXE MORE <SDLSETUP.DOC
  104. IF EXIST SDL_SHOW.EXE SDL_SHOW SDLSETUP.DOC
  105. set GET=SDLSETUP
  106. if NOT (%1)==() SET GET=SDLCONFG
  107. ECHO Returning to %GET% ...
  108. ECHO * * *
  109. GOTO CONTINUE
  110. :MENTION
  111. echo SDLSETUP.DOC was not found and cannot be displayed now.
  112. ECHO You may copy or print SDLSETUP.DOC from the original MASDIR disk.
  113. Pause
  114. :CONTINUE
  115. sdl_get B
  116. ECHO * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  117. ECHO * * *                     INSTRUCTIONS                              * * *
  118. ECHO * * *             Please read before proceeding.                    * * *
  119. ECHO * * *                                                               * * *
  120. ECHO You may exit at any point by pressing Ctrl-C and answering Y to terminate.
  121. ECHO * * *
  122. ECHO You may skip to the next section at ANY PROMPT by pressing the Escape key
  123. ECHO (Esc on most keyboards).  Note that all selections are made by "pressing"
  124. ECHO single keys.  These selections are NOT "entered" by pressing the Enter
  125. ECHO key after making the selection.
  126. ECHO * * *
  127. ECHO The questions are set up with the original defaults capitalized.  If you
  128. ECHO select the capitalized choices the original defaults will be restored.
  129. ECHO If the choices are not alphabetic, the first one shown is the original
  130. ECHO default.  Either caps or lower case letters are OK for your selections.
  131. ECHO * * *
  132. ECHO If you do not want to change the operation of a selection, just press
  133. ECHO the Enter key (sometimes called Return or "<CR>").  This is indicated as
  134. ECHO choice (cr). Or press Esc to skip to the next section of questions.
  135. ECHO * * *
  136. PAUSE
  137. REM Reset the size in GET
  138. sdl_get F SDL.COM
  139. IF (%1)==() SDLPARMS %$% %GET%
  140. IF (%1)==(SDLCONFG) SDLNOTOG %$% %GET%
  141. REM Normally the BATch file ends here, the rest are error messages.
  142. GOTO QUIT
  143. :NODEBUG
  144. ECHO * * *
  145. ECHO An error was encountered during the check of system resources.
  146. ECHO If the error message was "File creation error" and/or "File not found"
  147. ECHO it probably means the diskette is write protected.
  148. Echo * * *
  149. Echo If the error message was "Command or filename not recognized" or
  150. Echo 'Unknown command "debug"', or a similar message, it probably
  151. Echo means that your operating system is DR DOS.  Please see MASDIR54.NEW
  152. Echo for information on using the included DR DOS setup files, or contact
  153. Echo the author of MASDIR for a DR DOS compatible setup program.
  154. ECHO * * *
  155. ECHO If the message was "Bad command or file name" or similar, it means
  156. ECHO that the MS DOS system file DEBUG.COM is not available.
  157. ECHO This program must have access to the DOS external command file
  158. ECHO DEBUG.COM.  It must be in this directory on this disk or in
  159. ECHO one of the directories on your path, which is
  160. PATH
  161. set GET=SDLSETUP
  162. if NOT (%1)==() SET GET=SDLCONFG
  163. ECHO Please correct the problem and run %GET% again.
  164. goto quit
  165. :FILES
  166. ECHO * * *
  167. ECHO The following files must be in this current directory on this disk:
  168. FOR %%F IN (SDL.COM SDL_GET.EXE SDLPARMS.BAT SDLNOTOG.BAT) DO ECHO %%F
  169. FOR %%F IN (SDLSETUP.BAT SDLFINIS.BAT SDLDEBUG.BAT) DO ECHO %%F
  170. IF (%$%)==(54 55) ECHO SDLTITLE.COM
  171. GOTO QUIT
  172. :NOT1
  173. ECHO * * *
  174. ECHO MASDIR requires DOS 2.0 or higher (3.x preferred).
  175. GOTO QUIT
  176. :VERSION
  177. ECHO * * *
  178. set GET=SDLSETUP
  179. if NOT (%1)==() SET GET=SDLCONFG
  180. ECHO The version of SDL.COM on this disk is incompatible with this
  181. ECHO version of %GET%.  Please copy compatible versions from
  182. ECHO your original MASDIR disk and try again.
  183. GOTO QUIT
  184. :ENVIRON
  185. ECHO * * *
  186. ECHO There is insufficient DOS Environment space to run this program.
  187. ECHO You already have the following items set in the environment:
  188. ECHO * * *
  189. SET GET=
  190. SET
  191. ECHO * * *
  192. ECHO This program needs about 10 more bytes of space.  You can clear
  193. ECHO one or more of the items out of the environment by entering
  194. ECHO commands like
  195. ECHO SET var=
  196. ECHO Where var is the name of one of the objects shown between the
  197. ECHO lines of asterisks above.  Each name is followed by the = sign.
  198. ECHO When you enter the command do not put anything after the = sign,
  199. ECHO not even a space.  Just press the Enter key (cr) immediately after
  200. ECHO the = key.  Do not clear COMSPEC, PATH, or PROMPT.
  201. ECHO After you have cleared one or more names from the environment,
  202. ECHO run this program again.
  203. :QUIT
  204. pause
  205. REM SDLDEBUG will clean up any temporary files.
  206. sdldebug END
  207. :EXIT
  208. Echo Exiting to DOS